#pragma once
#include <memory>

//单例模式:静态类;
class SingletonStatic
{
private:
    class Singleton
    {
    public:
        Singleton();
        ~Singleton();

        static std::unique_ptr<SingletonStatic> m_pInstance;
    };
private:
    //私有化构造函数, 方式外部new;
    SingletonStatic();

    //禁用拷贝构造和赋值重载
    SingletonStatic(const SingletonStatic& hs) = delete;
    SingletonStatic& operator=(const SingletonStatic& hs) = delete;
public:
    ~SingletonStatic();

    //获取单例;
    static SingletonStatic* GetInstance();

    /// <summary>
    /// 其他接口;
    /// </summary>
    void Display();
};

